<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回当前元素的键</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="iterator.current.html">Iterator::current</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="iterator.next.html">Iterator::next</a></div>
 <div class="up"><a href="class.iterator.html">迭代器</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="iterator.key" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Iterator::key</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.0.0)</p><p class="refpurpose"><span class="refname">Iterator::key</span> &mdash; <span class="dc-title">返回当前元素的键</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-iterator.key-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">abstract</span> <span class="modifier">public</span> <span class="type"><span class="type scalar">scalar</span></span> <span class="methodname"><strong>Iterator::key</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   返回当前元素的键。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-iterator.key-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-iterator.key-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功返回<span class="type"><span class="type 标量">标量</span></span>，失败则返回 <strong><code>NULL</code></strong>。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-iterator.key-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   失败时分发 <strong><code>E_NOTICE</code></strong> 级错误。
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="iterator.current.html">Iterator::current</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="iterator.next.html">Iterator::next</a></div>
 <div class="up"><a href="class.iterator.html">迭代器</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
